package com.baaio.util;

import com.baaio.properties.DriverItem;


public enum DBInfo
{
    HOST,PORT,DBNAME,ROOTNAME,PASSWOROD,DBKIND,PRINT,DRIVENAME,JDBCURL;

    public String toString()
    {
        GetInfo gif = GetInfo.getInstance();
        switch(this)
        {
        case HOST: return gif.getHost();
        case PORT: return gif.getPort();
        case DBNAME: return gif.getDb();
        case ROOTNAME: return gif.getRoot();
        case PASSWOROD: return gif.getPwd();
        case DBKIND: return gif.getSqlORmysql();
        case PRINT: return gif.getPrint();
        case DRIVENAME: return DriverItem.getDriverName(gif.getSqlORmysql());
        case JDBCURL: return DriverItem.getJDBCUrl(gif.getHost(),gif.getPort(),gif.getDb(),gif.getSqlORmysql());
        
        }
        return null;
    }
}
